<?php

namespace app\common\model;

use think\Model;
use traits\model\SoftDelete;

class Sign extends Model
{
    //软删除
    use SoftDelete;

    //报名信息添加
    public function sign_add($data)
    {
        $validate = new \app\common\validate\Sign();
        if (!$validate->check($data)){
            return $validate -> getError();
        }
        $result = $this -> save($data);
        if ($result){
            return 1;
        } else {
            return 2;
        }
    }

}
